package com.web.dao;

import com.web.entity.MskPriceCount;

import static org.apache.ibatis.jdbc.SqlBuilder.*;

/**
 * @author FDjavaone
 */
public class MskPriceCountSqlProvider {


    public String insertSelective(MskPriceCount record) {
        BEGIN();
        INSERT_INTO("t_msk_price_count");
        
        if (record.getPrice() != null) {
            VALUES("price", "#{price,jdbcType=DECIMAL}");
        }
        
        if (record.getCreateTime() != null) {
            VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getModifyTime() != null) {
            VALUES("modify_time", "#{modifyTime,jdbcType=TIMESTAMP}");
        }
        
        return SQL();
    }

    public String updateByPrimaryKeySelective(MskPriceCount record) {
        BEGIN();
        UPDATE("t_msk_price_count");
        
        if (record.getPrice() != null) {
            SET("price = #{price,jdbcType=DECIMAL}");
        }
        
        if (record.getCreateTime() != null) {
            SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getModifyTime() != null) {
            SET("modify_time = #{modifyTime,jdbcType=TIMESTAMP}");
        }
        
        WHERE("id = #{id,jdbcType=BIGINT}");
        
        return SQL();
    }

}